package com.appbase.custom.base;

import android.os.Parcel;
import android.os.Parcelable;

public  class CarServerData implements Parcelable {
    public int save_days;
    public String abilities_cfg;
    public int is_free;
    public String iccid;
    public String type;
    public int expiration_time;
    public boolean about_to_expire;
    public String level;

    public CarServerData() {

    }


    protected CarServerData(Parcel in) {
        save_days = in.readInt();
        abilities_cfg = in.readString();
        is_free = in.readInt();
        iccid = in.readString();
        type = in.readString();
        expiration_time = in.readInt();
        about_to_expire = in.readByte() != 0;
        level = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(save_days);
        dest.writeString(abilities_cfg);
        dest.writeInt(is_free);
        dest.writeString(iccid);
        dest.writeString(type);
        dest.writeInt(expiration_time);
        dest.writeByte((byte) (about_to_expire ? 1 : 0));
        dest.writeString(level);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<CarServerData> CREATOR = new Creator<CarServerData>() {
        @Override
        public CarServerData createFromParcel(Parcel in) {
            return new CarServerData(in);
        }

        @Override
        public CarServerData[] newArray(int size) {
            return new CarServerData[size];
        }
    };
}
